<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
    <div style="width: 200px;height: 200px;background: red" class="box">

    </div>

    <script>
        var box = document.querySelector(".box");
        box.onclick=function(){

            if(box.requestFullscreen) {
                box.requestFullscreen();
            }else if(box.webkitRequestFullScreen){
                box.webkitRequestFullScreen();
            }else if(box.mozRequestFullScreen){
                box.mozRequestFullScreen();
            }
        }
    </script>

</body>
</html>